$(window).load(function(){
	/* 获取localstorage，填入上次信息 */
	var carOwnerInfo = JSON.parse(localStorage.getItem("eBizCarOwner"));
	if(carOwnerInfo){
		$(".owners-name").val(carOwnerInfo.ownerName);
	}



	/* 获取上一页面存入localStorage车辆信息，填入dom结构 */
	var carInfo = JSON.parse(localStorage.getItem("eBizCarInfo"));
	if(carInfo){
		for(var key in carInfo){
			if(carInfo[key] != "" || carInfo[key] != undefined || carInfo[key] != null){
				switch(key){
					case "frameNo":
						$(".car-vin").val(carInfo[key]);
						break;
					case "vehicleList":
						if(carInfo.vehicleList != "" && carInfo.vehicleList != undefined && carInfo.vehicleList != null){
							if(carInfo.vehicleList.length != 0){
								$(".model-value").hide();
								$(".car-model").attr("brandcode", carInfo.vehicleList[0].brandCode);
								$(".car-model").text(carInfo.vehicleList[0].vehicle);
							}
						}
						break;
					case "engineNo":
						$(".car-ein").val(carInfo[key]);
						break;
					case "registerDate":
						$(".car-regdata").val(carInfo[key]);
						break;
					case "isTrans":
						if (key == 1) {
							$(".isassigned").css({backgroundColor: "#EA4040"});
							$(".isassigned").find("p").css({left: "46.2025%"});
							$(".car-assignedData").show();
							if (carInfo.transDate != "" || carInfo.transDate != undefined || carInfo.transDate != null) {
								$(".car-assignedData").val(carInfo.transDate);
							};
							assigned = 1;
						}else if(key == 0){
							$(".isassigned").css({backgroundColor: "#F0F0F0"});
							$(".isassigned").find("p").css({left: "0"});
							$(".car-assignedData").hide();
							assigned = 0;
						}
						break;
					case "isapplicant":
						if (key == 1) {
							$(".isapplicant").css({backgroundColor: "#EA4040"});
							$(".isapplicant").find("p").css({left: "46.2025%"});
							$(".applicant-info").hide();
							isapplicant = 1;
						}else if(key == 0){
							$(".isapplicant").css({backgroundColor: "#F0F0F0"});
							$(".isapplicant").find("p").css({left: "0"});
							$(".applicant-info").show();
							isapplicant = 0;
						}
						break;
					case "isrecognizee":
						if (key == 1) {
							$(".isrecognizee").css({backgroundColor: "#EA4040"});
							$(".isrecognizee").find("p").css({left: "46.2025%"});
							$(".applicant-info").hide();
							isrecognizee = 1;
						}else if(key == 0){
							$(".isrecognizee").css({backgroundColor: "#F0F0F0"});
							$(".isrecognizee").find("p").css({left: "0"});
							$(".applicant-info").show();
							isrecognizee = 0;
						}
						break;
					case "ownerName":
						if($(".owners-name").val() == ""){
							$(".owners-name").val(carInfo.ownerName);
						}
						break;
					case "ownerMobile":
						$(".owners-phone").val(carInfo.ownerMobile);
						break;
					case "ownerIdNo":
						$(".owners-idcard").val(carInfo.ownerIdNo);
						break;
					case "applicantName":
						$(".applicant-name").val(carInfo.applicantName);
						break;
					case "applicantPhone":
						$(".applicant-phone").val(carInfo.applicantPhone);
						break;
					case "applicantIdCard":
						$(".applicant-idcard").val(carInfo.applicantIdCard);
						break;
					case "recognizeeName":
						$(".recognizee-name").val(carInfo.recognizeeName);
						break;
					case "recognizeePhone":
						$(".recognizee-phone").val(carInfo.recognizeePhone);
						break;
					case "recognizeeIdCard":
						$(".recognizee-idcard").val(carInfo.recognizeeIdCard);
						break;
					default:
						break;
				}
			}
		}
		if(carInfo.vehicleList != "" && carInfo.vehicleList != undefined && carInfo.vehicleList != null){
			for(i=0;i<carInfo.vehicleList.length;i++){
				var carModelList = $('<li><p brandcode="'+carInfo.vehicleList[i].brandCode+'">'+
					carInfo.vehicleList[i].vehicle+'</p><img src="images/user_un.png" /><input type="radio" value="" name="choice" /></li>');
				carModelList.appendTo($(".assigned-list ul"));
			}
		}
	}

	/* 拍照识别行驶证，身份证 */
	/* 获取微信签名认证，调用接口权限 */
	var getSignatureUrl = window.location.href.split('#')[0];
	var getSignature = wxAddress + "/weixin/sign/getSignature?url="+getSignatureUrl;
	ajaxEncapsulation(getSignature, getSignatureSuc, "", "GET", "true");

	var upLoadVehicleLicense = wxAddress + "/weixin/upLoadVehicleLicense";
	var upLoadIdcord = wxAddress + "/weixin/upLoadIdcord";
	function getSignatureSuc(data){
		if(data.code == "0000"){
			var config = data.data;
			if(config != undefined && config != null){
				wx.config({
					debug : true, // 开启调试模式,调用的所有api的返回值会在客户端alert出来，若要查看传入的参数，可以在pc端打开，参数信息会通过log打出，仅在pc端时才会打印。
					appId : config.appID, // 必填，appID公众号的唯一标识
					timestamp : config.timestamp, // 必填，生成签名的时间戳
					nonceStr : config.nonceStr, // 必填，生成签名的随机串
					signature : config.signature,// 必填，签名，见附录1
					jsApiList : [ 'chooseImage','uploadImage','downloadImage' ]
				});

				$(".user-vl").click(function(){
					readVlCardMsg();
				})

				$(".user-ic").click(function(){
					readIcCardMsg();
				})
			}
		}else{
			warnText($(".red-bg"),"获取微信签名失败！",1000);
		}
	}

	function readVlCardMsg(){
		wx.ready(function() {
			wx.chooseImage({
				count: 1, // 默认9
				sizeType: ['compressed'], // 可以指定是原图还是压缩图，默认二者都有, 'original'
				sourceType: ['album', 'camera'], // 可以指定来源是相册还是相机，默认二者都有
				success: function (res) {
					var localIds = res.localIds; // 返回选定照片的本地ID列表，localId可以作为img标签的src属性显示图片
					wx.uploadImage({
						localId: localIds, // 需要上传的图片的本地ID，由chooseImage接口获得
						isShowProgressTips: 1, // 默认为1，显示进度提示
						success: function (res) {
							wx.downloadImage({
								serverId: res.serverId, // 需要下载的图片的服务器端ID，由uploadImage接口获得
								isShowProgressTips: 1, // 默认为1，显示进度提示
								success: function (res) {
									var localId = res.localId; // 返回图片下载后的本地ID
									var upLoadVLData = {
										img: localId// 返回图片的服务器端ID
									}
									ajaxEncapsulation(upLoadVehicleLicense, upLoadVehicleLicenseSuc, upLoadVehicleLicenseErr, "POST", "true", upLoadVLData);
								}
							});
						}
					});
				}
			});
		})
	}
	
	function upLoadVehicleLicenseSuc(data){
		console.log(data);
		if(data.code == "0000"){
			var vlMessage = data.data.words_result;
			for(var key in vlMessage){
				if(vlMessage[key] != "" || vlMessage[key] != undefined || vlMessage[key] != null){
					switch(key){
						case "车辆识别代号":
							if(vlMessage[key].words != "" || vlMessage[key].words != undefined || vlMessage[key].words != null){
								$(".car-vin").val(vlMessage[key].words);
							}
							break;
						case "注册登记日期":
							if(vlMessage[key].words != "" || vlMessage[key].words != undefined || vlMessage[key].words != null){
								$(".car-regdata").val(vlMessage[key].words.substring(0, 4)+"-"+vlMessage[key].words.substring(4, 6)+"-"+vlMessage[key].words.substring(6, vlMessage[key].words.length));
							}
							break;
						case "发动机号码":
							if(vlMessage[key].words != "" || vlMessage[key].words != undefined || vlMessage[key].words != null){
								$(".car-ein").val(vlMessage[key].words);
							}
							break;
						case "所有人":
							if(vlMessage[key].words != "" || vlMessage[key].words != undefined || vlMessage[key].words != null){
								$(".owners-name").val(vlMessage[key].words);
							}
							break;
						default:
							break;
					}
				}
			}
		}else{
			warnText($(".red-bg"),"获取行驶证信息失败！",1000);
		}
	}

	function upLoadVehicleLicenseErr(data){
		warnText($(".red-bg"),"获取行驶证信息失败！",1000);
	}

	function readIcCardMsg(){
		wx.ready(function() {
			wx.chooseImage({
				count: 1, // 默认9
				sizeType: ['compressed'], // 可以指定是原图还是压缩图，默认二者都有, 'original'
				sourceType: ['album', 'camera'], // 可以指定来源是相册还是相机，默认二者都有
				success: function (res) {
					var localIds = res.localIds; // 返回选定照片的本地ID列表，localId可以作为img标签的src属性显示图片
					wx.uploadImage({
						localId: localIds, // 需要上传的图片的本地ID，由chooseImage接口获得
						isShowProgressTips: 1, // 默认为1，显示进度提示
						success: function (res) {
							wx.downloadImage({
								serverId: res.serverId, // 需要下载的图片的服务器端ID，由uploadImage接口获得
								isShowProgressTips: 1, // 默认为1，显示进度提示
								success: function (res) {
									var localId = res.localId; // 返回图片下载后的本地ID
									var upLoadVLData = {
										img: localId// 返回图片的服务器端ID
									}
									ajaxEncapsulation(upLoadIdcord, upLoadIdcordSuc, upLoadIdcordErr, "POST", "true", upLoadVLData);
								}
							});
						}
					});
				}
			});
		})
	}

	function upLoadIdcordSuc(data){
		console.log(data);
		if(data.code == "0000"){
			var icMessage = data.data.words_result;
			for(var key in icMessage){
				if(icMessage[key] != "" || icMessage[key] != undefined || icMessage[key] != null){
					switch(key){
						case "姓名":
							if(icMessage[key].words != "" || icMessage[key].words != undefined || icMessage[key].words != null){
								$(".owners-name").val(icMessage[key].words);
							}
							break;
						case "公民身份号码":
							if(icMessage[key].words != "" || icMessage[key].words != undefined || icMessage[key].words != null){
								$(".owners-idcard").val(icMessage[key].words);
							}
							break;
						default:
							break;
					}
				}
			}
		}else{
			warnText($(".red-bg"),"获取身份证信息失败！",1000);
		}
	}

	function upLoadIdcordErr(data){
		warnText($(".red-bg"),"获取身份证信息失败！",1000);
	}



	/* 选择品牌型号，切换界面 */
	$(".car-choicemodel").delegate(".car-model", "click", function(){
		choiceModel();
	})

	$(".car-choicemodel").delegate(".model-value", "click", function(){
		choiceModel();
	})

	$(".car-choicemodel").delegate(".choice-model", "click", function(){
		choiceModel();
	})

	function choiceModel(){
		$(".user-information").hide();
		$(".user-assigned").show();
		$("title").html("选择车型");
	}



	/* 注册日期-选择插件 */
	new DateSelector({
		input: "registerData",
		container: "registerContainer",
		type: 0,
		param: [1,1,1,0,0],
		beginTime: [],
		endTime: [],
		recentTime: [],
		success: function(arr){
			for(var i=0;i<arr.length;i++){
				if(arr[1]<10){var monthData = "0"+ arr[1];}
				else{var monthData = arr[1];}
				if(arr[2]<10){var dayData = "0"+ arr[2];}
				else {var dayData = arr[2];}
			}
			$("#registerData").val(arr[0]+"-"+monthData+"-"+dayData);
		}
	});

	$("#registerContainer").delegate("#date-selector-bg-registerContainer", "touchmove", function(e){
		e.preventDefault();
	});



	/* 是否过户按钮 */
	var assigned = 0;
	$(".isassigned").on("click", function(){
		if(assigned == 1){
			$(this).find("p").stop().animate({left: "0"},"normal",function(){
				$(this).parent().css({backgroundColor: "#F0F0F0"});
				$(".car-assignedData").hide();
				assigned = 0;
			});
		}else if(assigned == 0){
			$(this).find("p").stop().animate({left: "46.2025%"},"normal",function(){
				$(this).parent().css({backgroundColor: "#EA4040"});
				$(".car-assignedData").show();
				assigned = 1;
			});
		}
	})



	/* 过户日期-选择插件 */
	new DateSelector({
		input: "assignedData",
		container: "assignedContainer",
		type: 0,
		param: [1,1,1,0,0],
		beginTime: [],
		endTime: [],
		recentTime: [],
		success: function(arr){
			for(var i=0;i<arr.length;i++){
				if(arr[1]<10){var monthData = "0"+ arr[1];}
				else{var monthData = arr[1];}
				if(arr[2]<10){var dayData = "0"+ arr[2];}
				else {var dayData = arr[2];}
			}
			$("#assignedData").val(arr[0]+"-"+monthData+"-"+dayData);
		}
	});
	
	$("#assignedContainer").delegate("#date-selector-bg-assignedContainer", "touchmove", function(e){
		e.preventDefault();
	});



	/* 投保人及被保人是否同车主按钮 */
	// 投保人同车主按钮
	var isapplicant = 1;
	$(".isapplicant").on("click", function(){
		if(isapplicant == 1){
			$(this).find("p").stop().animate({left: "0"},"normal",function(){
				$(this).parent().css({backgroundColor: "#F0F0F0"});
				$(".applicant-info").show();
				isapplicant = 0;
			});
		}else if(isapplicant == 0){
			$(this).find("p").stop().animate({left: "46.2025%"},"normal",function(){
				$(this).parent().css({backgroundColor: "#EA4040"});
				$(".applicant-info").hide();
				isapplicant = 1;
			});
		}
	})

	// 被保人同车主按钮
	var isrecognizee = 1;
	$(".isrecognizee").on("click", function(){
		if(isrecognizee == 1){
			$(this).find("p").stop().animate({left: "0"},"normal",function(){
				$(this).parent().css({backgroundColor: "#F0F0F0"});
				$(".recognizee-info").show();
				isrecognizee = 0;
			});
		}else if(isrecognizee == 0){
			$(this).find("p").stop().animate({left: "46.2025%"},"normal",function(){
				$(this).parent().css({backgroundColor: "#EA4040"});
				$(".recognizee-info").hide();
				isrecognizee = 1;
			});
		}
	})



	/* 输入信息完整后，确定按钮相关规范 */
	// 车辆识别代号只允许输入数字加英文
	$(".car-vin").keyup(function() {
		$(this).val($(this).val().replace(/[\W]/g, ''));
	});

	// 限制车辆识别代号长度及转换成大写
	$(".car-vin").on("input", function() {
		if($(this).val().length > 17) {
			$(this).val($(this).val().substring(0, 17));
			return;
		}
		$(this).val($(this).val().toLocaleUpperCase());
	})

	// 发动机号只允许输入数字加英文
	$(".car-ein").on("input propertychange", function(event) {
		$(this).val($(this).val().replace(/[\W]/g, ''));
	}); 

	// 确定用户信息并提交
	var postInfo = wxAddress + "/weixin/saveTruckInfoNew";
	$(".user-next").on("click", function(){
		console.log(isapplicant);
		console.log(isrecognizee);
		var transDate;
		var applicantName,applicantPhone,applicantIdCard;
		var recognizeeName,recognizeePhone,recognizeeIdCard;
		if($(".car-vin").val() == ""){
			warnText($(".red-bg"),"车架号不能为空！",1000);
			return false;
		}else if(regs.frameNo.test($(".car-vin").val()) == false){
			warnText($(".red-bg"),"车架号格式错误！",1000);
			return false;
		}
		if($(".car-model").text() == ""){
			warnText($(".red-bg"),"品牌型号不能为空！",1000);
			return false;
		}
		if($(".car-ein").val() == ""){
			warnText($(".red-bg"),"发动机号不能为空！",1000);
			return false;
		}
		if($(".car-regdata").val() == ""){
			warnText($(".red-bg"),"注册日期不能为空！",1000);
			return false;
		}
		if(assigned == 1){// 过户车
			if($(".car-regdata").val() == ""){
				warnText($(".red-bg"),"过户日期不能为空！",1000);
				return false;
			}else {
				transDate = $(".car-regdata").val();
			}
		}else if(assigned == 0){// 非过户车
			transDate = "";
		}
		if($(".owners-name").val() == ""){
			warnText($(".red-bg"),"车主姓名不能为空！",1000);
			return false;
		}
		if($(".owners-idcard").val() == ""){
			warnText($(".red-bg"),"车主身份证不能为空！",1000);
			return false;
		}else if(regs.idCardReg.test($(".owners-idcard").val()) == false){
			warnText($(".red-bg"),"车主身份证格式错误！",1000);
			return false;
		}
		if($(".owners-phone").val() == ""){
			warnText($(".red-bg"),"车主手机号不能为空！",1000);
			return false;
		}else if(regs.phoneReg.test($(".owners-phone").val()) == false){
			warnText($(".red-bg"),"车主手机号格式错误！",1000);
			return false;
		}
		if(isapplicant == 0){// 投保人不同车主
			if($(".applicant-name").val() == ""){
				warnText($(".red-bg"),"投保人姓名不能为空！",1000);
				return false;
			}else{
				applicantName = $(".applicant-name").val();
			}
			if($(".applicant-idcard").val() == ""){
				warnText($(".red-bg"),"投保人身份证不能为空！",1000);
				return false;
			}else if(regs.idCardReg.test($(".applicant-idcard").val()) == false){
				warnText($(".red-bg"),"投保人身份证格式错误！",1000);
				return false;
			}else{
				applicantIdCard = $(".applicant-idcard").val();
			}
			if($(".applicant-phone").val() == ""){
				warnText($(".red-bg"),"投保人手机号不能为空！",1000);
				return false;
			}else if(regs.phoneReg.test($(".applicant-phone").val()) == false){
				warnText($(".red-bg"),"投保人手机号格式错误！",1000);
				return false;
			}else{
				applicantPhone = $(".applicant-phone").val();
			}
		}else if(isapplicant == 1){// 投保人同车主
			applicantName = $(".owners-name").val();
			applicantPhone = $(".owners-phone").val();
			applicantIdCard = $(".owners-idcard").val();
		}
		if(isrecognizee == 0){// 被保人不同车主
			if($(".recognizee-name").val() == ""){
				warnText($(".red-bg"),"被保人姓名不能为空！",1000);
				return false;
			}else{
				recognizeeName = $(".applicant-name").val();
			}
			if($(".recognizee-idcard").val() == ""){
				warnText($(".red-bg"),"被保人身份证不能为空！",1000);
				return false;
			}else if(regs.idCardReg.test($(".recognizee-idcard").val()) == false){
				warnText($(".red-bg"),"被保人身份证格式错误！",1000);
				return false;
			}else{
				recognizeeIdCard = $(".applicant-idcard").val();
			}
			if($(".recognizee-phone").val() == ""){
				warnText($(".red-bg"),"被保人手机号不能为空！",1000);
				return false;
			}else if(regs.phoneReg.test($(".recognizee-phone").val()) == false){
				warnText($(".red-bg"),"被保人手机号格式错误！",1000);
				return false;
			}else{
				recognizeePhone = $(".applicant-phone").val();
			}
		}else if(isrecognizee == 1){// 被保人同车主
			recognizeeName = $(".owners-name").val();
			recognizeePhone = $(".owners-phone").val();
			recognizeeIdCard = $(".owners-idcard").val();
		}
		var infoData = {
			brandCode: $(".car-model").attr("brandcode"),
			brandName: $(".car-model").text(),
			cityCode: carInfo.cityCode,
			engineNo: $(".car-ein").val(),
			vin: $(".car-vin").val(),
			isLoanCar: carInfo.isLoanCar,
			isTrans: assigned,
			licenseNo: carInfo.licenseNo,
			modelCode: carInfo.modelCode,
			ownerIdNo: $(".owners-idcard").val(),
			ownerMobile: $(".owners-phone").val(),
			ownerName: $(".owners-name").val(),
			registerDate: $(".car-regdata").val(),
			responseNo: carInfo.responseNo,
			sourceCertificateNo: carInfo.sourceCertificateNo,
			specialCarDate: carInfo.specialCarDate,
			specialCarFlag: carInfo.specialCarFlag,
			transDate: transDate,
			vehicleFgwCode: carInfo.vehicleFgwCode,
			phone: $(".owners-phone").val(),
			idCard: $(".owners-idcard").val(),
			applicantName: applicantName,
			applicantPhone: applicantPhone,
			applicantIdCard: applicantIdCard,
			recognizeeName: recognizeeName,
			recognizeePhone: recognizeePhone,
			recognizeeIdCard: recognizeeIdCard,
			isapplicant: isapplicant,
			isrecognizee: isrecognizee
		}
		console.log(infoData);
		$(".masklayer").show();
		$(".maskImg").show();
		var carInfoNew = JSON.stringify(infoData);
		window.localStorage.setItem("eBizCarInfoNew", carInfoNew);
		ajaxEncapsulation(postInfo, postInfoSuc, postInfoErr, "POST", "true", infoData);
	})

	function postInfoSuc(data){
		console.log(data);
		$(".masklayer").hide();
		$(".maskImg").hide();
		if(data.code == "0000"){
			var defaultInsurance = JSON.stringify(data.data);
			window.localStorage.setItem("eBizDefaultInsurance", defaultInsurance);
			window.location.href = "bizcoverage.html";
		}else {
			warnText($(".red-bg"),"获取车辆保险信息异常，错误码："+data.code,1000);
		}
	}

	function postInfoErr(data){
		$(".masklayer").hide();
		$(".maskImg").hide();
		warnText($(".red-bg"),"网络异常！",1000);
	}



	/* 搜索框功能及DOM结构渲染，选择车型功能 */
	// 搜索框聚焦情况
	$(".input-select").on("focus", function(){
		$(this).addClass("isflex");
	})

	// 搜索框失焦情况
	$(".input-select").on("blur", function(){
		if($(this).val()==""){
			$(".img-close").hide();
			$(this).removeClass("isflex");
		}
	})

	// 搜索框输入监听
	$(".input-select").on("input propertychange", function(){
		if($(this).val()==""){
			$(".img-close").hide();
		}else{
			$(".img-close").show();
		}
	})

	// 搜索框清空按钮
	$(".img-close").on("click", function(){
		$(".input-select").val("").focus();
	})

	// 搜索功能
	var selectOldValue = $(".input-select").val();
	var selectNewValue = "";
	var selectTimer;
	var getCarModel = wxAddress + "/car/query";
	$(".input-select").on("keydown", function(){
		clearTimeout(selectTimer);
	})

	$(".input-select").on("keyup", function(){
		selectNewValue = $(".input-select").val();
		selectTimer = setTimeout(function(){
			if(selectNewValue != selectOldValue && selectNewValue != ""){
				var selectData = {
					brandName: selectNewValue
				}
				$(".assigned-list ul").html("");
				ajaxEncapsulation(getCarModel, getCarModelSuc, "", "POST", "true", selectData);
				selectOldValue = selectNewValue;
			}
		}, 2000);
	})

	function getCarModelSuc(data){
		console.log(data);
		if(data.code == "0000"){
			if(data.data == null || data.data == "" || data.data == undefined){
				warnText($(".red-bg"),"未查询到相关车辆信息！",1000);
			}else{
				var carSelectModel = data.data;
				for(i in carSelectModel){
					var carSelectList = $('<li><p brandcode="'+i+'">'+
						carSelectModel[i]+'</p><img src="images/user_un.png" /><input type="radio" value="" name="choice" /></li>');
					carSelectList.appendTo($(".assigned-list ul"));
				}
			}
		}else{
			warnText($(".red-bg"),"连接错误，获取失败！",1000);
		}
	}

	// 车型结果列表-选择车型
	$(".assigned-list").delegate("li","click", function(){
		if($(this).find("input").prop("checked")){
			$(this).find("input").prop("checked",false);
			$(this).find("img").attr("src", "images/user_un.png");
			$(this).siblings("li").find("img").attr("src", "images/user_un.png");
			window.localStorage.removeItem("eBizChoiceCarModel");
		}else{
			$(this).find("input").prop("checked",true);
			$(this).find("img").attr("src", "images/user_on.png");
			$(this).siblings("li").find("img").attr("src", "images/user_un.png");
			var choiceCarModel = {
				"vehicle": $(this).find("p").text(),
				"brandCode": $(this).find("p").attr("brandcode")
			}
			window.localStorage.setItem("eBizChoiceCarModel", JSON.stringify(choiceCarModel));
		}
	})

	// 选择车型-确定车型按钮
	$(".assigned-next").on("click", function(){
		var carModel = JSON.parse(localStorage.getItem("eBizChoiceCarModel"));
		if(carModel != "" && carModel != undefined && carModel != null){
			$(".model-value").hide();
			$(".car-model").attr("brandcode", carModel.brandCode);
			$(".car-model").text(carModel.vehicle);
		}else {
			warnText($(".red-bg"),"您还未选择车型！",1000);
		}
		$(".user-assigned").hide();
		$(".user-information").show();
		$("title").html("车辆信息");
	})
})